package com.unitspirit.sample.cmbchina;

import cn.luischen.dao.UserDao;
import cn.luischen.exception.BusinessException;
import cn.luischen.model.UserDomain;

import javax.validation.constraints.FutureOrPresent;
import java.util.ArrayList;
import java.util.List;

@lombok.RequiredArgsConstructor
public class UserServiceImpl2 {
    private final UserDao userDaoabc;

    public int updateUserInfoabc(UserDomain user) {
        if (null == user.getUid())
            throw BusinessException.withErrorCode("用户编号不可能为空");
        return userDaoabc.updateUserInfo(user);
    }
    public int updateUserInfoabc() {
        UserDomain user=new UserDomain();
        userDaoabc.getUserInfoById(1);
        userDaoabc.getUserInfoByCond("abc", "def");
        return 1;
    }
    public int updateUserInfoabc(int i,UserDomain user2) {
        UserDomain user=new UserDomain();
        userDaoabc.getUserInfoById(1);
        return 1;
    }
    public int updateUserInfoabc(UserDomain user2,int i) {
        UserDomain user=new UserDomain();
        userDaoabc.getUserInfoById(1);
        return 1;
    }
    public int updateUserInfoabc(int user2,int i) {
        UserDomain user=new UserDomain();
        userDaoabc.getUserInfoById(1);
        return 1;
    }


    public UserDomain updateUserInfodef(UserDomain user) {
        if (null == user.getUid())
            throw BusinessException.withErrorCode("用户编号不可能为空");
        return userDaoabc.getUserInfoById(1);
    }

    public UserDomain updateUserInfodef(List<UserDomain> user2) {
        return userDaoabc.getUserInfoById(1);
    }

    public UserDomain updateUserInfodef(ArrayList<UserDomain> user2) {
        return userDaoabc.getUserInfoById(1);
    }

    public UserDomain updateUserInfodef(UserDomain[] user2) {
        return userDaoabc.getUserInfoById(1);
    }

    public int updateUserInfo2(UserDomain user) {
        if (null == user.getUid())
            throw BusinessException.withErrorCode("用户编号不可能为空");
        return 1;
    }

    public int updateUserInfo(UserDomain user) {
        return 0;
    }
}
